package com.magicsoft.app.helper;

import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;

public class VersionHelper {

	
	/**
	 * 获取软件版本号
	 * 
	 * @param context
	 * @return
	 */
	public static int getVersionCode(Context context)
	{
	    int versionCode = 233;
	    try
	    {
	        // 获取软件版本号，
	        versionCode = context.getPackageManager().getPackageInfo("com.boyuan.huijiaoyu", 0).versionCode;
	    } catch (NameNotFoundException e)
	    {
	        e.printStackTrace();
	    }
	    return versionCode;
	}
	
	
}
